<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>218-正则对象的属性.html</title>
</head>
<body>
	
</body>
<script>
	var str = "x1x1";
	var reg = /a/;

	console.log(str);
	console.log(reg.lastIndex);
	reg.lastIndex = 1;
	console.log(reg.lastIndex)
	console.log(str.replace(reg,"*"));
	console.log(reg.source);
</script>	
</html>